package com.ersin.sistek.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

@Entity
@Table(name = "MALZEME", catalog = "testdb")
public class MalzemeBean extends BaseBean implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	
	
	@Column(name = "MALZEME_ADI", unique = true, nullable = false, length = 10)
	private String malzemeAdi;

	public String getMalzemeAdi() {
		return malzemeAdi;
	}

	public void setMalzemeAdi(String malzemeAdi) {
		this.malzemeAdi = malzemeAdi;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((malzemeAdi == null) ? 0 : malzemeAdi.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		MalzemeBean other = (MalzemeBean) obj;
		
		if (malzemeAdi == null) {
			if (other.malzemeAdi != null)
				return false;
		} else if (!malzemeAdi.equals(other.malzemeAdi))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "MalzemeBean [ malzemeAdi=" + malzemeAdi + "]";
	}

	

}
